import { reqBgImages } from '../api'
const state = {
  // 所有图片的数据
  bgImages: []
}
const mutations = {
  GETBGIMAGES(state, bgImages) {
    state.bgImages = bgImages
  }
}
const actions = {
  // 获取所有图片的数据
  async getBgImages({ commit }) {
    let result = await reqBgImages();
    if (result.code == 200) {
      commit("GETBGIMAGES", result.data.bgImages)
    }
  }
}
const getters = {}
export default {
  state, mutations, actions, getters
}